<?php

namespace api\modules\v1\models;

use Yii;
use api\common\models\Common;
use api\modules\v1\models\Like;
use api\common\controllers\CommonController;
use api\common\models\Mar;
use yii\db\Expression;
use yii\helpers\Url;
use yii\data\Pagination;
use yii\web\Link;
use \yii\caching\FileDependency;
class Activity extends Common
{
    public static $_tableName = '{{%user_activity}}' ;
    /**
     * @return array|string
     */
    public static function tableName()
    {
        return self::$_tableName;
    }
    public function getList($page,$pagesize){
        $page = ($page <= 1)?1:$page;
        $query =(new \yii\db\Query());
        $query->from(self::$_tableName);
        $query->select('*');
        $query->where('status = 1');
        $data = $query->offset(($page-1)*$pagesize)
            ->limit($pagesize)
            ->orderBy('actid desc')
            ->all();
        return $data;
    }
}
